package com.lanou.controller;

import com.lanou.bean.StudentBean;
import com.lanou.service.StuService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by dllo on 18/2/9.
 */
@Controller
public class MainController {
    @Resource
    private StuService stuService;
    @RequestMapping(value = "/page")
    public String goHome(){
        return "home";
    }
    @ResponseBody
    @RequestMapping(value = "/findAll")
    public List<StudentBean> allStu(){
        return stuService.findAllStu();
    }
    //123456

}
